import java.io.IOException;
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;
public class test_4_21 {
    public static void main(String[] args) {
        int[] arr = new int[4];
        for(int i = 0; i < 4; i++) {
            arr[i] = 4;
        }
    }
    public static void main12(String[] args) {
        String a = "23, 21.3, 33; 34, 2, 1.9, 2.1; 3, 3, 1, 3, 4, 4.9";
        String[] b = a.split(";");
        Double [][] c = new Double[100][100];
        for (int i = 0; i < b.length; i++) {
            String[] d = b[i].split(",");
            for(int j = 0; j < d.length; j++){
                c[i][j] = Double.parseDouble(d[j]);
                System.out.print(c[i][j] + " ");
            }
            System.out.println();
        }
    }
    public static void main11(String[] args) {
        int[][] array1 = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
        int[][] array2 = {{2, 2, 2}, {1, 1, 1}, {3, 3, 3}};
        System.out.println("Array c:");
        for (int i = 0; i < array1.length; i++) {
            for (int j = 0; j < array1[i].length; j++) {
                System.out.print(array1[i][j] + "\t");
            }
            System.out.println();
        }
        System.out.println("Array d:");
        for (int i = 0; i < array2.length; i++) {
            for (int j = 0; j < array2[i].length; j++) {
                System.out.print(array2[i][j] + "\t");
            }
            System.out.println();
        }
        int[][] array3 = new int[3][3];
        for (int i = 0; i < array3.length; i++) {
            for (int j = 0; j < array3[i].length; j++) {
                array3[i][j] = array2[i][j] + array1[i][j];
            }
        }
        System.out.println("Array c+d");
        for (int i = 0; i < array3.length; i++) {
            for (int j = 0; j < array3[i].length; j++) {
                System.out.print(array3[i][j] + "\t");
            }
            System.out.println();
        }
        for (int i = 0; i < array3.length; i++) {
            for (int j = 0; j < array3[i].length; j++) {
                array3[i][j] = array1[i][0] * array2[0][j] + array1[i][1]
                        * array2[1][j] + array1[i][2] * array2[2][j];
            }
        }
        System.out.println("Array c*d");
        for (int i = 0; i < array3.length; i++) {
            for (int j = 0; j < array3[i].length; j++) {
                System.out.print(array3[i][j] + "\t");
            }
            System.out.println();
        }
    }
    public static void main10(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.nextLine();
        int[] arr1 = {0, 0, 0, 0, 0};
        char[] arr2 = {'A', 'E', 'I', 'O', 'U'};
        for(int i = 0; i < a.length(); i++){
            if(a.charAt(i) == 'A' || a.charAt(i) == 'a'){
                arr1[0] += 1;
            }else if(a.charAt(i) == 'E' || a.charAt(i) == 'e'){
                arr1[1] += 1;
            }else if(a.charAt(i) == 'I' || a.charAt(i) == 'i'){
                arr1[2] += 1;
            }else if(a.charAt(i) == 'O' || a.charAt(i) == 'o'){
                arr1[3] += 1;
            }else if(a.charAt(i) == 'U' || a.charAt(i) == 'u'){
                arr1[4] += 1;
            }
        }
        System.out.println(arr2[0] + "的个数为：" + arr1[0] + "个。");
        System.out.println(arr2[1] + "的个数为：" + arr1[1] + "个。");
        System.out.println(arr2[2] + "的个数为：" + arr1[2] + "个。");
        System.out.println(arr2[3] + "的个数为：" + arr1[3] + "个。");
        System.out.println(arr2[4] + "的个数为：" + arr1[4] + "个。");
    }
    public static void main9(String[] args) {
        String[] arr1 = {"Ace", "1", "2", "3", "4", "5", "6", "7", "8",
                "9", "10", "Jack", "Queen", "King" };
        String[] arr2 = {"Diamonds", "Hearts", "Spades", "Clubs"};
        String Card = "";
        Random random = new Random();
        int a = random.nextInt(arr1.length);
        int b = random.nextInt(arr2.length);
        System.out.print("The Card you picked is " + arr1[a] + " ]of " + arr2[b]
        + ".");
    }
    public static void main8(String[] args)  {
        int count = 0;
        for(int i = 1; i <= 100; i++){
            if(i == 100){
                System.out.print(i + "=");
            }else{
                System.out.print(i + "+");
            }
            count += i;
        }
        System.out.println(count);
    }
    public static void main7(String[] args) throws IOException {
            char ch;
            System.out.println("按 1/2/3 数字键可得大奖!");
            System.out.println("按空格键后回车可退出循环操作.");
            while ((ch=(char)System.in.read())!=' ')
            { //System.in.skip(2);	// 跳过回车键(skip方法跳过和丢弃输入流中数据的 n 个字节)
                switch (ch) {
                    case '1': System.out.println("恭喜你得大奖，一辆汽车!");
                        break;
                    case '2': System.out.println("不错呀，你得到一台笔记本电脑!");
                        break;
                    case '3': System.out.println("没有白来，你得到一台冰箱!");
                        break;
                    default:
                        System.out.println("真不幸，你没有奖品!下次再来吧。");
                }
            }
        }
    public static void main6(String[] args) {
        int h,c;
        System.out.println("摄氏温度	华氏温度");
        for (c=0; c<=40; c+=5) {
            h=c*9/5+32;
            System.out.println("	"+c+"	"+h);
        }
    }
    public static void main5(String[] args) {
        int c=38;
        switch (c<10?1:c<25?2:c<35?3:4) {
            case 1:
                System.out.println(" "+c+"℃ 有点冷。要多穿衣服。"); break;
            case 2:
                System.out.println(" "+c+"℃ 正合适。出去玩吧。"); break;
            case 3:
                System.out.println(" "+c+"℃ 有点热。"); break;
            default:
                System.out.println(" "+c+"℃ 太热了!开空调。");
        }
    }
    public static void test(int year)
    {
        if(year%400==0||(year%4==0&&year%100!=0))
            System.out.println("是闰年！");
        else
            System.out.println("不是闰年！");
    }
    public static void main4(String[] args) {
        int year;
        Scanner input = new Scanner(System.in);
        for(int i=0;i<4;i++)
        {
            year=input.nextInt();
            test(year);
        }
    }
    public static void main3(String[] args) {
        int[] arr = {7, 4, 3, 5, 8};
        int l = arr.length;
        //从第一个元素开始找到最小的一个元素放到第一个，以此类推
        for(int i = 0; i < l; i++){
            //遍历所有元素进行比较，小的放前面
            for(int j = i + 1; j < l; j++){
                if(arr[i] > arr[j]){
                    int b = arr[i];
                    arr[i] = arr[j];
                    arr[j] = b;
                }
            }
        }
        for (int x : arr){
            System.out.print(x + " ");
        }
    }
    public static void main2(String[] args) {
        int[] arr = {7, 4, 3, 5, 8};
        //冒泡排序
        int l = arr.length;
        //总共需要多少趟排序
        for (int i = 0; i < l - 1; i++){
            //每一对需要多少对排序
            for (int j = 0; j < l - 1 - i; j++){
                if (arr[j] > arr[j + 1]){
                    int b = arr[j];
                    arr[j] = arr[j + 1];
                    arr[j + 1] = b;
                }
            }
        }
        for (int x : arr){
            System.out.print(x + " ");
        }
    }
    public static void main1(String[] args) {
        args = new String[10];
        int count = 0;
        Scanner input = new Scanner(System.in);
        System.out.print("请输入十个整数：");
        for (int i = 0; i < args.length; i++){
            args[i] = String.valueOf(input.nextInt());
        }
        for(String x : args){
            count += Integer.parseInt(x);
        }
        System.out.print("十个数之和为：" + count);
    }
}
